<include file="Public:header" />
<include file="Public:menu" menu_account="curr" />
<include file="Public:navibar" />
<include file="_sub_menu" adminmanage="selected" />
<div clidass="main">
    <switch name="select">
    <case value="adminAdd">
        <h4>添加新管理员</h4>
        <table class="edit">
            <tr>
                <td class="label">用户名</td>
                <td><input class="text" type="text" name="admin_name" /></td>
            </tr>
            <tr>
                <td class="label">密码</td>
                <td><input class="text" type="password" name="password" /></td>
            </tr>
            <tr>
                <td class="label"></td>
                <td><label><input name="power" type="checkbox" id="power" value="1" />&nbsp;超级管理员</label></td>
            </tr>
            <tr>
                <td class="label"></td>
                <td><button class="btn btn_silver fbold" type="submit"><span>创建</span></button></td>
            </tr>
        </table>
    </case>
    <case value="adminPower">
        <h4>权限管理</h4>
        <form action="__URL__/adminPowers" method="post">
            <table class="edit">
                <tr>
                    <td class="label">ID</td>
                    <td><input class="text" type="text" value="{{$admin['admin_id']}}" /></td>
                </tr>
                <tr>
                    <td class="label">用户名</td>
                    <td><input class="text" type="text" value="{{$admin['admin_name']}}" /></td>
                </tr>
                <tr>
                    <td class="label">权限</td>
                    <td><label><input name="power" class="checkbox" id="power" type="checkbox" value="1"  <present name="admin['super']">checked</present> /> 超级管理员</label></td>
                </tr>
                <tr>
                    <td class="label"></td>
                    <td><button class="btn btn_silver fbold" type="submit" onClick="if (confirm('是否确认提交？'))this.form.submit();return false;"><span>提交</span></button></td>
                </tr>
            </table>
        </form>
    </case>
    <default />
    <h4>管理员账号管理</h4>
    <hr class="dash">
    <div class="console">
        <form rm name="search" method="get" action="__URL__/adminManage" class="right"> 
            <input class="text" type="text" name="keyword" value="{{$keyword}}" required  />&nbsp; 
            <button class="btn btn_silver fbold" type="submit"><span>搜索</span></button>
        </form>
        <a href="__URL__/adminAdd" class="btn btn_silver fbold left"><span>添加管理员</span></a>
    </div>
    <form name="adminform" method="post" action="__URL__/adminDelete">   
        <table class="list" width="100%">
            <thead>
            <tr>
                <th width="3%"><input name="checkbox" class="checkbox" type="checkbox"  onClick="" /></th>
                <th width="5%">ID</th>
                <th>用户名</th>
                <th width="150">最后登陆</th>
                <th width="150">操作</th>
            </tr>
            </thead>
            <volist name="admin" id="vo">
                <tr>
                    <td><input name="id[]" type="checkbox" class="checkbox" id="id[]" value="{{$vo.admin_id}}" /></td>
                    <td>{{$vo.admin_id}}</td>
                    <td>{{$vo.admin_name}}</td>
                    <td><if condition="$vo.last_time eq ''"><span class="silver">暂无登陆记录</span><else />{{$vo.last_time|date="Y-n-j H:i:s",###}}</if></td>
                <td>
                    <a href="__URL__/adminPower/admin_id/{{$vo.admin_id}}">权限管理</a>&nbsp;&nbsp;
                    <a href="__URL__/adminDelete/admin_id/{{$vo.admin_id}}" onclick="if (!confirm('是否确认提交？'))return false;">删除</a> 
                </td>

                </tr>
            </volist>
            <tfoot>
                <tr>
                    <td colspan="6">
                        <button type="submit" class="btn btn_silver btn_small" onclick="if (!confirm('确认都要删除吗？'))return false;"><span>删除</span>
                    </td>
                </tr>
            </tfoot>
        </table>
    </form>
    <include file="Public:paging" />
    </switch>    

</div>




<include file="Public:footer" />